# Maintainer: Ray Donnelly <mingw.android@gmail.com>

_realname=Sys-CPU
pkgname=perl-${_realname}
pkgver=0.61
pkgrel=2
pkgdesc="Provide commonly requested regular expressions"
arch=('i686' 'x86_64')
url="http://search.cpan.org/~mzsanford/${_realname}-${pkgver}"
groups=('perl-modules')
depends=('perl' 'libcrypt-devel')
license=('GPL' 'PerlArtistic')
source=("http://search.cpan.org/CPAN/authors/id/M/MZ/MZSANFORD/${_realname}-${pkgver}.tar.gz"
        "0001-Cygwin-is-as-per-Windows.patch")
md5sums=('f43a3a50ac2dca6c1485a859ebef09b2'
         'eefe27257d26db885b418376dcdd1b56')

prepare() {
  cd "$srcdir/${_realname}-${pkgver}"

  patch -p1 -i "${srcdir}"/0001-Cygwin-is-as-per-Windows.patch
}

build() {
  cd "$srcdir/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "$srcdir/${_realname}-${pkgver}"
  make install DESTDIR="$pkgdir"
}
